﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/AdminTemplate.Master" AutoEventWireup="true"
    CodeBehind="PayAdvertisement.aspx.cs" Inherits="RealtorsPortal.AdminCP.PayAdvertisement" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Unpaid advertisement list</title>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            //set option
            $("#navheadADV").addClass("selected");
            $("#mnuAdv").css("display", "block");
            $(".submenu li a[title='Pay advertisements']").css({ "color": "#fff", "background": "#222", "border": "1px solid #333" });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>
        Unpaid advertisement list.</h1>
    <asp:Panel ID="pnlAdsList" runat="server">
        <asp:GridView ID="grvUnpaidAds" runat="server" AutoGenerateColumns="False" AllowPaging="True"
            PageSize="5" Width="100%" DataKeyNames="AdvId" OnRowCommand="grvManageMyAdver_RowCommand"
            Height="42px">
            <HeaderStyle CssClass="header_gridview" />
            <Columns>
                
                <asp:TemplateField HeaderText="ID">
                    <ItemTemplate>
                        <%#Eval("AdvId")%>
                    </ItemTemplate>
                </asp:TemplateField>

                <asp:TemplateField HeaderText="Title">
                    <ItemTemplate>
                        <%#Eval("Title")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Type">
                    <ItemTemplate>
                        <%#Eval("Type")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Package">
                    <ItemTemplate>
                        <%#Eval("PackageName")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Price">
                    <ItemTemplate>
                        <%#Eval("Price")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Posted date">
                    <ItemTemplate>
                        <%#Eval("PostedDate")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="View">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtnBrowse" runat="server" CommandName="BrowseComponent" ValidationGroup="browse"
                            CausesValidation="True" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>'>
                            <asp:Image ID="ibtnBrowse" runat="server" ImageUrl="assets/b_browse.png" />
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Pay">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbtnReNew" runat="server" CommandName="PayComponent" ValidationGroup="Pay"
                            CausesValidation="true" CommandArgument='<%# DataBinder.Eval(Container, "RowIndex") %>'>
                            <asp:Image ID="ibtnReNew" runat="server" ImageUrl="assets/payment-icon.png" />
                        </asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </asp:Panel>
    <asp:Panel ID="pnlPayment" runat="server" Visible="False">
        <fieldset>
            <legend> Payment </legend>
            <div class="input_field" id="divFirstName" runat="server">
                <label>
                    First Name:
                </label>
                <asp:TextBox ID="txtFirtName" runat="server" Width="215px">
                </asp:TextBox><asp:RequiredFieldValidator ID="rfv1" runat="server" ControlToValidate="txtFirtName"
                    CssClass="validate_error" ToolTip="required" ForeColor="" 
                    ValidationGroup="payment" />
            </div>
            <div class="input_field" id="divLastName" runat="server">
                <label>
                    Last Name:
                </label>
                <asp:TextBox ID="txtLastName" runat="server" Width="215px">
                </asp:TextBox><asp:RequiredFieldValidator ID="rfv2" runat="server" ControlToValidate="txtLastName"
                    CssClass="validate_error" ToolTip="required" ForeColor="" 
                    ValidationGroup="payment" />
            </div>
            <div class="input_field" id="divCardNumber" runat="server">
                <label>
                    Card Number:
                </label>
                <asp:TextBox ID="txtCardNumber" runat="server" Width="215px">
                </asp:TextBox><asp:RequiredFieldValidator ID="rfv3" runat="server" ControlToValidate="txtCardNumber"
                    CssClass="validate_error" ToolTip="required" ForeColor="" 
                    ValidationGroup="payment" />
            </div>

            <div class="input_field" id="div1" runat="server">
                <label>
                    Security code:
                </label>
                <asp:TextBox ID="txtSecurityCode" runat="server" Width="215px">
                </asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                    runat="server" ControlToValidate="txtSecurityCode"
                    CssClass="validate_error" ToolTip="required" ForeColor="" 
                    ValidationGroup="payment" />
            </div>

            <div class="input_field" id="divEmail" runat="server">
                <label>
                    Email:
                </label>
                <asp:TextBox ID="txtEmail" runat="server" Width="215px">
                </asp:TextBox><asp:RequiredFieldValidator ID="rfv4" runat="server" ControlToValidate="txtEmail"
                    CssClass="validate_error" ToolTip="required" ForeColor="" 
                    ValidationGroup="payment" />
            </div>
            <div class="input_field" id="divPhone" runat="server">
                <label>
                    Phone Number:
                </label>
                <asp:TextBox ID="txtPhone" runat="server" Width="215px">
                </asp:TextBox><asp:RequiredFieldValidator ID="rfv6" runat="server" ControlToValidate="txtPhone"
                    CssClass="validate_error" ToolTip="required" ForeColor="" 
                    ValidationGroup="payment" />
            </div>
            <div class="input_field">
                <label>&nbsp;</label>
                <table style="border: none;">
                    <tr>
                        <td align="right">
                            <asp:Image ID="Image1" Width="150" Height="70" runat="server" ImageUrl="~/AdminCP/assets/payPal.jpg" style="margin-left: 60px;" />
                        </td>
                    </tr>
                </table>
            </div>
            <div class="input_field no_margin_bottom" style="margin-left: 60px;">
                <label>
                    &nbsp;</label>
                <asp:Button ID="btnSubmit" runat="server" Text="SUBMIT" CssClass="submit" 
                    onclick="btnSubmit_Click" ValidationGroup="payment" />
                <input class="submit" type="reset" value="RESET" />
            </div>
        </fieldset>
    </asp:Panel>
    <asp:Label ID="lblStatus" runat="server" style="margin-left: 100px;" 
        Font-Bold="True" Font-Size="30px" ForeColor="#66FF33"></asp:Label>
</asp:Content>
